<!-- UserController.php-->
<?php 
	require 'Admin/Model/commentModel.php';
	require 'Controller.php';
	class commentController extends Controller{
		function listcomments(){
			$model = new commentModel();
			$data = $model->getcommentList();
			//转向用户列表页面
			include 'Admin/View/comment/listcomments.php';
		}

	
	

		function delcomment(){
			$id = $_GET['id'];
			$model = new commentmodel();
			$result = $model->delcomment($id);
			if($result){
				echo '删除成功'.'<a href="admin.php?c=comment&m=listcomments">如果没有跳转，请点这里跳转</a>';
				header("refresh:3;admin.php?c=comment&m=listcomments = admin.php?c=comment&m=listcomments"); 
			}else{
				echo '删除失败';
			}
		}

		
		}
	
 ?>